import request from '@/utils/request'

// 查询成品预排产计划列表
export function listProductPreSchedulingPlan(query) {
  return request({
    url: '/sales/productPreSchedulingPlan/list',
    method: 'get',
    params: query
  })
}

// 查询成品预排产计划详细
export function getProductPreSchedulingPlan(id) {
  return request({
    url: '/sales/productPreSchedulingPlan/' + id,
    method: 'get'
  })
}
// 查询成品预排产计划详细
export function formalProduction(id) {
  return request({
    url: '/sales/productPreSchedulingPlan/formalProduction/' + id,
    method: 'get'
  })
}

// 新增成品预排产计划
export function addProductPreSchedulingPlan(data) {
  return request({
    url: '/sales/productPreSchedulingPlan',
    method: 'post',
    data: data
  })
}

// 修改成品预排产计划
export function updateProductPreSchedulingPlan(data) {
  return request({
    url: '/sales/productPreSchedulingPlan',
    method: 'put',
    data: data
  })
}

// 删除成品预排产计划
export function delProductPreSchedulingPlan(id) {
  return request({
    url: '/sales/productPreSchedulingPlan/' + id,
    method: 'delete'
  })
}
